﻿using System;

namespace Songhay.Data
{
    /// <summary>
    /// Data for data access configuration exceptions.
    /// </summary>
    public class DataAccessConfigurationException : Exception
    {
        /// <summary>
        /// Construct exception data based on a missing configuration item.
        /// </summary>
        /// <param name="configurationItemName">The unique name of the missing item.</param>
        /// <param name="message">The base <see cref="System.Exception.Message"/>.</param>
        public DataAccessConfigurationException(String configurationItemName, String message) : base(message)
        {
            this._configurationItemName = configurationItemName;
        }

        /// <summary>
        /// The unique name of the missing configuration item.
        /// </summary>
        public string ConfigurationItemName
        {
            get { return _configurationItemName; }
        }

        private string _configurationItemName;
    }
}
